import com.maochang.top.bean.Account;
import com.maochang.top.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
        AccountService accountService = app.getBean("accountService", AccountService.class);
        Account byId = accountService.findById(1);
        System.out.println(byId);
    }
}
